﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ef.ServiceImplement;

namespace ef_CodeFirst.Controllers
{
    /// <summary>
    /// 通用功能的分部视图
    /// </summary>
    public class CommonUCController : Controller
    {
        ef.ServiceInterface.ICategoryService iCategoryService = null;
        public CommonUCController()
        {
            iCategoryService = new CategoryService();
        }
        /// <summary>
        /// 分类的列表框
        /// </summary>
        /// <param name="cateID"></param>
        /// <returns></returns>
        public ActionResult CategoryForSelectList(int? cateID)
        {
            SelectList model = new SelectList(iCategoryService.GetCategory(), "ID", "Name");
            return View(model);
        }

    }
}
